home *** CD-ROM | disk | FTP | other *** search
- 1 rem "rh-pinochle 2c" 2000.05.09 *** compacted version
- 2 gosub3002
- 3 gosub12:onqgoto9,4,3,3,3
- 4 gosub1002:onqgoto9,4:gosub1202:onqgoto9,4:ifbp=290then4
- 5 gosub1402:onqgoto9,4:gosub1802:onqgoto9,4:iff=2thenon2+(q<>5)goto4,3
- 6 gosub2002:onqgoto9,4,4,4,3
- 9 goto4002
- 12 pokevl+39,1:ifq=4thenq=3:goto30
- 18 sysml+9:i%=cr%:on2+(i%>0)goto22:sysml+60,a$(28):on2+(i%>0)goto22
- 20 on1+fnhp(p)goto22:on2+(r1%=0andr2%=0)goto18:q=4:goto30
- 22 q=3:ifi%<5thenoni%gosub2978,2902,2916,2964:onqgoto30,30:on2+fnhp(p)goto18,30
- 24 ifbn>-1thenifi%>=bnthenbq=i%-bn:goto30
- 26 bq=-1:c=i%-5:a=(c>=cn):c=c+cn*a
- 28 on2+(s%(c,p)>-1)goto30:on2+(c=0ora)goto18:c=c-1:on2+s%(c,p)goto18
- 30 pokevl+39,7:return
- 36 sysml+24,(m*b%(d%(3,0))):wait653,1,1:return
- 102 on2+fnec(p)gosub110,122:return
- 110 forc=0tocn-2:gosub138:gosub146:gosub162:onp+1gosub190,204,212,204:next
- 116 c=cn-1:gosub138:gosub146:gosub154:return
- 122 on2+(ca=0)goto134:t=pand253:forc=catocz:ontgoto130
- 128 sysml+126,x%(c,p),x%(c,p),y%(c,p),y%(c,p)+1,97,98,c%(2),c%(2):goto132
- 130 sysml+12,x%(c,p),y%(c,p),a$(23)
- 132 next
- 134 return
- 138 r=r%(c,p):s=s%(c,p):return
- 146 x=x%(ca+c,p):y=y%(ca+c,p):return
- 154 gosub162:onp+1gosub170,204,212,204:poke646,c%(2):return
- 162 poke646,c%(3+(sand253)):return
- 170 gosub162:sysml+12,x,y,r$(r)+a$(24):sysml+12,x,y+1,s$(s)+a$(24)
- 180 sysml+12,x,y+2,a$(24)+s$(s):sysml+12,x,y+3,a$(24)+r$(r):poke646,c%(2):return
- 190 gosub162:sysml+12,x,y,r$(r):sysml+12,x,y+1,s$(s)
- 196 poke646,c%(0):sysml+12,x+1,y,a$(25):sysml+12,x+1,y+1,a$(25)
- 198 sysml+12,x,y+2,a$(26):sysml+12,x,y+3,a$(26):poke646,c%(2):return
- 204 sysml+12,x,y,r$(r)+s$(s):return
- 212 sysml+12,x,y,r$(r):sysml+12,x,y+1,s$(s):return
- 220 gosub146:onpgoto226,228,226:sysml+30,x,x-2*(c=cn-1),y,y+3,255,cc:goto230
- 226 sysml+30,x,x+1,y,y,255,cc:goto230
- 228 sysml+30,x,x,y,y+1,255,cc
- 230 return
- 234 l=len(a$):onpgoto242,244,246
- 240 x=20-l/2:y=ys%(p)-7:goto248
- 242 x=xs%(p)+5:y=11:goto248
- 244 x=20-l/2:y=ys%(p)+5:goto248
- 246 x=xs%(p)-4-l:y=11
- 248 poke199,1:sysml+12,x,y,a$:poke199,0:return
- 254 sysml+30,x,x+9,y,y,160,c%(2):return
- 262 sysml+12,x,y,a$:return
- 270 c=-1:fors=3to0step-1:sn%(s,p,p)=0:forr=5to0step-1
- 276 ifch%(r,s,p,p)>0thenforn=1toch%(r,s,p,p):c=c+1:r%(c,p)=r:s%(c,p)=s:next
- 278 sn%(s,p,p)=sn%(s,p,p)+ch%(r,s,p,p):next:so%(s,p)=12-sn%(s,p,p):next:return
- 284 sysml+30,x%(0,1)+2,x%(0,3)-1,y%(0,2)+2,y%(0,0)-1,160,c%(2):return
- 292 gosub146:onpgoto316,318,316
- 298 ift%(p)>0thenc=t%(p)-1:gosub138:ifs>-1then302
- 300 sysml+30,x,x,y,y+3,160,c%(2):goto308
- 302 sysml+30,x,x,y,y+1,160,c%(1)
- 304 gosub162:sysml+12,x,y+2,s$(s):sysml+12,x,y+3,r$(r):poke646,c%(2)
- 306 sysml+30,x-1,x-1,y,y+3,160,c%(1)
- 308 x=x+1:sysml+30,x,x,y,y+3,160,c%(2):x=x+1
- 310 ift%(p)<11thenc=t%(p)+1:gosub138:ifs>-1then314
- 312 sysml+30,x,x,y,y+3,160,c%(2):goto320
- 314 gosub162:sysml+12,x,y,r$(r):sysml+12,x,y+1,s$(s):poke646,c%(2):goto320
- 316 sysml+30,x,x+1,y,y,160,c%(2):goto320
- 318 sysml+30,x,x,y,y+1,160,c%(2)
- 320 c=t%(p):return
- 326 on1+fnec(p)goto338:onpgoto334,336,334
- 332 sysml+30,x%(0,p),x%(15,p)+2,y%(0,p),y%(0,p)+3,160,c%(2):goto338
- 334 sysml+30,x%(0,p),x%(0,p)+1,y%(0,p),y%(15,p),160,c%(2):goto338
- 336 sysml+30,x%(0,p),x%(15,p),y%(0,p),y%(0,p)+1,160,c%(2)
- 338 return
- 342 sysml+39,hg:pokerv+48,peek(mv+2):return
- 350 sysml+42,hg:pokemv,lg:pokemv+2,peek(rv+48):return
- 358 sysml+48,12,28,13,15,fna(6+z):gosub366:bn=n+1:return
- 366 n=peek(mv+2):pokerv+49,n:i%=peek(rv+50+z):pokemv+2,n+i%
- 372 m=fna(11+z):sysml+129,m,m+4*i%,hd*256+4*n:return
- 378 sysml+30,12,28,13,15,160,c%(2):pokemv+2,peek(rv+49):bn=-1:return
- 386 sysml+36,i%,255,c%(1):return
- 394 sysml+36,i%,255,c%(3):return
- 402 sysml+30,xs%(1)+1,xs%(3)-1,ys%(2)+1,ys%(0)-1,160,c%(2)
- 408 sysml+30,xs%(0)-1,xs%(0)+10,ys%(0),ys%(0),160,c%(1)
- 410 sysml+30,xs%(1),xs%(1),ys%(1)-1,ys%(1)+10,160,c%(1)
- 412 sysml+30,xs%(2)-1,xs%(2)+10,ys%(2),ys%(2),160,c%(1)
- 414 sysml+30,xs%(3),xs%(3),ys%(3)-1,ys%(3)+10,160,c%(1):return
- 420 gosub466:fori=0to1:u%(i)=p%(sb,i,0)+p%(sb,a2%(i),0):v%(i)=u%(i):next
- 428 poke646,c%(0):sysml+12,14,8,a$(12):on2+(f=2)goto436
- 430 i=tb:on1+np%(i)goto434:i=td:on1+(np%(i)=0)goto436
- 432 v%(i)=10*m%(0+sb,i)+10*m%(0+sb,a2%(i)):on2+(u%(i)=v%(i))goto436
- 434 poke646,c%(3+i):sysml+12,13,13,t$(i):poke646,c%(0):sysml+12,17,13,a$(13)
- 436 l=4:fori=0to1:poke646,c%(3+i):y=9+i:sysml+12,10,y,t$(i)
- 438 n=np%(i):gosub494:sysml+12,10+4,y,a$:n=u%(i):gosub494:sysml+12,10+9,y,a$
- 440 n=np%(i)+v%(i):on1+(i=tb)goto442:n=n*(f+1):n=n+(n+bp)*(np%(i)<np%(2)orf=2)
- 442 gosub494:sysml+12,10+15,y,a$:np%(i)=n:ns%(i)=ns%(i)+n:next
- 446 poke646,c%(3+tb):sysml+12,14,12,t$(tb)
- 448 poke646,c%(0):sysml+12,18,12,a$(15+(np%(tb)<bp)):poke646,c%(2):m=240:gosub36:gosub474
- 454 on2+(ns%(0)<1500andns%(1)<1500)goto462
- 456 q=5:gosub466:t=tb+(tb-td)*(ns%(tb)<1500):poke646,c%(3+t):sysml+12,12,10,t$(t)
- 460 poke646,c%(0):sysml+12,16,10,a$(16):poke646,c%(2)
- 462 return
- 466 sysml+30,9,30,7,14,160,c%(4)+16:return
- 474 sysml+30,xs%(1)+6,xs%(1)+8,ys%(2),ys%(2),160,c%(1)
- 480 sysml+30,xs%(3)-4,xs%(3)-1,ys%(2),ys%(2),160,c%(1)
- 482 sysml+30,xs%(1)+6,xs%(1)+9,ys%(0)+1,ys%(0)+2,160,c%(1):l=5:x=xs%(3)-5
- 486 fort=0to1:poke646,c%(3+t):n=ns%(t):gosub494:y=ys%(0)+1+t:gosub262:next:poke646,c%(2):return
- 494 a$=right$(a$(27)+str$(n),l):return
- 502 onpgoto510,508,510
- 508 poke646,c%(3):sysml+12,xs%(p)+2,ys%(p),a$(m):goto512
- 510 poke646,c%(4):fori=1to6:sysml+12,xs%(p),ys%(p)+i+1,mid$(a$(m),i,1):next
- 512 poke646,c%(2):return
- 518 fors=0to3:k=0+s:m%(k,p)=ch%(0,s,p,p)
- 528 n=0:forl=0to1:a=(ch%(2,s,p,p)>landch%(3,s,p,p)>l):n=n-a:l=1+(1-l)*a:next
- 530 k=8+s:m%(k,p)=n
- 532 n=0:forl=0to1:forr=1to5:gosub558:r=5+(5-r)*a:next:n=n-a:l=1+(1-l)*a:next
- 534 k=17+s:m%(k,p)=n
- 536 k=4+s:m%(k,p)=((ch%(2,s,p,p)>1)+(ch%(3,s,p,p)>1))*(m%(17+s,p)=1):next
- 542 fork=13to16:r=k-12-(k=16):n=0
- 544 forl=0to1:fors=0to3:gosub558:s=3+(3-s)*a:next:n=n-a:l=1+(1-l)*a:next:m%(k,p)=n:next
- 550 k=12
- 552 m%(k,p)=-(ch%(1,0,p,p)>0andch%(2,3,p,p)>0)-(ch%(1,0,p,p)>1andch%(2,3,p,p)>1)
- 554 return
- 558 a=(ch%(r,s,p,p)>l):return
- 566 m=0:forj=0to3:k=13+j:m=m+(40+20*j)*fnmm(m%(k,p)):next
- 578 ifm%(12,p)>0thenm=m+40:ifm%(12,p)>1thenm=m+260
- 582 fors=0to3:m=m+20*m%(8+s,p):next:fors=0to3
- 588 p%(s,p,0)=m+10*m%(0+s,p):k=17+s:p%(s,p,0)=p%(s,p,0)+150*fnmm(m%(k,p))
- 590 onm%(k,p)goto592,594:p%(s,p,0)=p%(s,p,0)+20*m%(8+s,p):goto596
- 592 p%(s,p,0)=p%(s,p,0)+20*m%(4+s,p)
- 594 p%(s,p,0)=p%(s,p,0)-20*m%(8+s,p)
- 596 next:return
- 1002 q=3:gosub402:pokemv+2,4:np%(0)=0:np%(1)=0
- 1006 pd=a1%(pd)+(a1%(pd)-pd)*(f=2andbp=290):p=pd
- 1008 m=17:gosub502:poke176,lr:poke177,hr:poke178,48:sysrl
- 1010 sysml+129,fna(2),fna(2)+768,fna(3):sysml+129,fna(2),fna(2)+128,fna(5)
- 1012 fori=0to3:p=a1%(p):gosub1034:gosub270:gosub102:next:return
- 1034 forc=0to11:v=int((peek(rv+12*p+c)-1)/2):s=int(v/6):r=int(v-s*6)
- 1038 ch%(r,s,p,p)=ch%(r,s,p,p)+1:next:return
- 1202 bp=290:p=a1%(pd):pb=p:v=0:fori=0to3:bp%(i)=0:v%(i)=-1:next
- 1206 gosub518:gosub566:gosub1268:w=0:fors=1to3:ifp%(s,p,3)<p%(w,p,3)then1214
- 1210 ifp%(s,p,3)>p%(w,p,3)thenw=s:goto1214
- 1211 ifu%(s)<u%(w)then1214
- 1212 ifu%(s)>u%(w)thenw=s:goto1214
- 1213 ifsn%(s,p,p)>sn%(w,p,p)thenw=s
- 1214 next:v%(p)=w
- 1224 iffnhp(p)thengosub1360:onqgoto1264,1264,1238
- 1236 gosub1346:gosub12:onqgoto1264,1264
- 1238 ifathenpb=p:a$=str$(bp):goto1242
- 1240 v=vorb%(p):a$=a$(0)
- 1242 gosub234:m=40:gosub36:if(vorb%(pb))=15thenon2+(v=15)goto1245,1248
- 1244 p=a1%(p):on2+v%(p)goto1206:on2+((vandb%(p))=0)goto1224,1244
- 1245 gosub466:poke646,c%(0):sysml+12,16,10,a$(18):poke646,c%(2):m=40:gosub36:goto1264
- 1248 gosub284:p=pb:tb=pband253:td=1-tb:iffnhp(p)thengosub1382:onqgoto1264,1264,1254
- 1252 sb=v%(p):gosub12:onqgoto1264,1264
- 1254 a$=a$(4+sb):gosub234:m=40:gosub36:gosub284:t=tb:m=19:gosub502:s=sb:gosub162
- 1260 sysml+12,xs%(p),ys%(p),s$(sb):sysml+12,xs%(p)+9*(1-t),ys%(p)+9*t,s$(sb)
- 1261 poke646,c%(3+t):l=4:n=bp:gosub494:x=xs%(3)-4:y=ys%(2):gosub262:poke646,c%(2)
- 1264 return
- 1268 fors=0to3:p%(s,p,1)=0:p%(s,p,2)=0:u%(s)=0:next
- 1276 fors=0to3:m=sn%(s,p,p):ifm=0then1280
- 1278 n=0:forr=5to0step-1:n=n+2:u%(s)=u%(s)+ch%(r,s,p,p):r=r+r*(n>=m):next
- 1280 next:fors=0to3:sp=s:fork=1to3:sp=a1%(sp):p%(s,p,1)=p%(s,p,1)+u%(sp)*20:next:next
- 1284 fors=0to3:j=0:m=sn%(s,p,p)+int(so%(s,p)/3+0.5):ifsn%(s,p,p)=0then1290
- 1285 ifu%(s)>=3thenp%(s,p,1)=p%(s,p,1)+20*m:goto1290
- 1286 n=0:forr=5to0step-1:n=n+2:j=j+ch%(r,s,p,p):r=r+r*(n>=m):next
- 1288 p%(s,p,1)=p%(s,p,1)+20*(j+int(m/3-1))
- 1290 next:fors=0to3:p%(s,p,1)=250+(250-p%(s,p,1))*(p%(s,p,1)<240):next
- 1294 m=2+d%(0,0):t=(pand253):n=int((ns%(t)-ns%(1-t))/500)
- 1296 on2+(n<1)goto1299:on2+(ns%(t)+n*140<1500)goto1299:m=m-n:m=m+(m-1)*(m<1)
- 1299 fors=0to3:on2+(sn%(s,p,p)<4)goto1326:n=0
- 1302 k=12:ifm%(k,p)=2then1308
- 1303 onsgoto1308,1308:r=3-a2%(s):on2+(ch%(r,s,p,p)=2)goto1308:sp=3-s
- 1304 ifch%(r,s,p,p)=1andch%(a2%(s),sp,p,p)=0thenn=1:p%(s,p,2)=40+30:goto1308
- 1305 ifch%(r,s,p,p)=0andch%(a2%(s),sp,p,p)=2thenn=0:p%(s,p,2)=40+90:goto1308
- 1306 ifch%(r,s,p,p)=1andch%(a2%(s),sp,p,p)=2thenn=0:p%(s,p,2)=90
- 1308 k=17+s:onm%(k,p)goto1316,1320
- 1312 j=5:l=0:forr=1to5:gosub558:j=j+a:next:ifj>2orn+j>mthen1320
- 1314 n=n+j:p%(s,p,2)=p%(s,p,2)+(150+20*(m%(8+s,p)=1)):ifn=mthen1326
- 1316 j=5:l=1:forr=1to5:gosub558:j=j+a:next:ifj>2orn+j>mthen1320
- 1318 n=n+j:p%(s,p,2)=p%(s,p,2)+(1500-150)*(1/3)^j:ifn=mthen1326
- 1320 k=16:onm%(k,p)goto1324,1326
- 1322 j=4:forsp=0to3:j=j+(ch%(5,sp,p,p)>0):next:ifn+j>mthen1326
- 1323 n=n+j:p%(s,p,2)=p%(s,p,2)+100+80*(n=4):ifn=mthen1326
- 1324 j=4:forsp=0to3:j=j+(ch%(5,sp,p,p)>1):next:ifn+j>mthen1326
- 1325 n=n+j:p%(s,p,2)=p%(s,p,2)+(1000-100)*(1/3)^j
- 1326 next:fors=0to3:p%(s,p,3)=p%(s,p,0)+p%(s,p,1)+p%(s,p,2):next
- 1336 m=40*(m%(13,p)=1)+60*(m%(14,p)=1andm%(15,p)=0)+80*(m%(15,p)=1andm%(14,p)=0)
- 1337 fors=0to3:p%(s,p,3)=p%(s,p,3)+m+40*(ch%(5,s,p,p)=0):next
- 1338 fors=0to3:ifp%(s,p,1)=250thenifp%(s,p,3)-250<250thenp%(s,p,3)=500
- 1340 next:return
- 1346 a=(v<>5andv<>10andp%(v%(p),p,3)>bp):ifa=0orv=0orv%(a2%(p))=-1then1354
- 1352 a=((vandb%(a2%(p)))=b%(a2%(p))orp%(v%(p),p,3)>p%(v%(a2%(p)),a2%(p),3))
- 1354 bp=bp-10*a:ifa=0ord%(0,0)<>2orv%(p)>-1then1358
- 1355 j=4:l=0:r=5:fors=0to3:gosub558:j=j+a:next:bp%(p)=-(j=1)
- 1356 bp%(p)=bp%(p)-2*(4-ch%(1,0,p,p)-ch%(2,3,p,p)=1)
- 1357 bp=bp+10*bp%(p):ifbp%(p)=0thenbp%(p)=4
- 1358 return
- 1360 z=0:gosub358:l=4:n=bp+10:x=18:y=15
- 1366 gosub494:gosub262:gosub12:on2+(q<>3)goto1379
- 1370 onbqgoto1378,1374,1376:a=0:goto1379
- 1374 n=n+10*(n>bp+10):goto1366
- 1376 n=n-10*(n<9990):goto1366
- 1378 a=-1:bp=n
- 1379 gosub378:return
- 1382 z=1:gosub358:gosub12:gosub378:ifq=3thensb=bq
- 1390 return
- 1402 px=a2%(pb):p=px:iffnhp(p)thenz=5:gosub366:gosub1728:onqgoto1428,1428,1412
- 1410 gosub1432:gosub12:onqgoto1428,1428
- 1412 gosub1698:p=pb:gosub270:gosub518:gosub326:ca=0:cz=15:cn=16:gosub102
- 1416 iffnhp(p)thenz=6:gosub366:gosub1728:onqgoto1428,1428,1420
- 1418 gosub1560:gosub12:onqgoto1428,1428
- 1420 gosub1710:p=pb:gosub270:gosub518:gosub566:gosub326:ca=2:cz=13:cn=12:gosub102
- 1424 p=px:gosub270:gosub518:gosub566:gosub102:pokemv+2,4
- 1428 return
- 1432 n=-1:u=0:a$=a$(8):gosub234
- 1440 onsbgoto1448,1448:on2+(m%(12,p)=2)goto1460:on2+((bp%(pb)and2)=2)goto1446
- 1441 r=3-a2%(sb):sp=3-sb
- 1442 onch%(r,sb,p,p)+1goto1448,1444:on2+(ch%(a2%(sb),sp,p,p)=0)goto1446,1448
- 1444 ifch%(a2%(sb),sp,p,p)<>2then1448
- 1446 forc=0to11:on2+fnpl(0)gosub1550:next
- 1448 forc=0to11:iffnfr(0)andch%(r%(c,p),sb,p,p)=2thengosub1550:c=c+1
- 1452 next:ifn=3then1542
- 1456 forc=0to11:on2+(fnfr(0)andch%(r%(c,p),sb,p,p)=1)gosub1550:next:ifn=3then1542
- 1460 forc=0to11:ifr%(c,p)=5andch%(5,s%(c,p),p,p)=2thengosub1550:c=c+1
- 1466 next:ifn=3then1542
- 1469 if(bp%(p)and1)=1thenl=1:fors=0to3:gosub558:s=s+(s-3)*a:next:ifathen1474
- 1470 forc=0to11:ifr%(c,p)=5andch%(5,s%(c,p),p,p)=1thengosub1550
- 1472 next:ifn=3then1542
- 1474 onsbgoto1480,1480:ifm%(12,p)=2then1480
- 1478 forc=0to11:gosub138:on2+(s=3-sbandr=a2%(sb))gosub1550:next:ifn=3then1542
- 1480 forc=0to11:on2+(fnfr(0)and(m%(12,p)<>2ornotfnpl(0)))gosub1550:next:ifn=3then1542
- 1488 forc=0to11:on2+(r%(c,p)=5)gosub1550:next:ifn=3then1542
- 1492 onsbgoto1500,1500
- 1494 ifm%(12,p)<>2orn=-1thenforc=0to11:on2+fnpl(0)gosub1550:next:ifn=3then1542
- 1500 forc=0to11:on2+(s%(c,p)=sbandr%(c,p)=0)gosub1550:next:ifn=3then1542
- 1506 forc=0to11:on2+(r%(c,p)=4andch%(5,s%(c,p),p,p)=2)gosub1550:next:ifn=3then1542
- 1512 fork=2to0step-1:forc=0to11:on2+(r%(c,p)=0andch%(5,s%(c,p),p,p)=k)gosub1550:next
- 1518 ifn=3then1534
- 1522 forc=0to11:gosub138:on2+(r=1ands<>0andch%(5,s,p,p)=k)gosub1550:next:ifn=3then1534
- 1528 forc=0to11:gosub138:ifr=2ands<>3andm%(8+s,p)=0andch%(5,s,p,p)=kthengosub1550
- 1532 next
- 1534 next:ifn=3then1542
- 1538 fork=2to0step-1:forc=0to11:on2+(notfnpl(0)andch%(5,s%(c,p),p,p)=k)gosub1550:next:next
- 1542 gosub254:iffnec(p)thenforc=0to11:on2+((uandb%(c))<>0)gosub220:next:m=100:gosub36
- 1546 return
- 1550 if(uandb%(c))=0thenn=n+1:u=uorb%(c):v%(n)=c:ifn=3thenc=11:k=0
- 1556 return
- 1560 n=0:forc=0to15:u%(c)=0:next:a$=a$(8):gosub234
- 1570 ifm%(17+sb,pb)=2thenn=10:forc=0to15:gosub138:u%(c)=fnfr(0):next:goto1580
- 1574 fork=16to13step-1
- 1576 ifm%(k,pb)=2thenn=8:v=k-12-(k-16):forc=0to15:gosub138:u%(c)=(r=v):next:k=13
- 1578 next
- 1580 ifm%(12,pb)<>2then1588
- 1584 ifsb=1orsb=2thenn=12:forc=0to15:u%(c)=notfnpl(0):next:goto1680
- 1586 forc=0to15:on2+fnpl(0)gosub1688:next:ifn=12then1680
- 1588 ifn>=8orm%(8,pb)=0orm%(9,pb)=0orm%(10,pb)=0orm%(11,pb)=0then1598
- 1592 v=0:forc=0to15:gosub138:ifr=2orr=3thenw=r-2+s*4:if(vandb%(w))=0thenv=vorb%(w):gosub1688
- 1596 next:ifn=12then1680
- 1598 ifm%(17+sb,pb)<>1then1608
- 1602 v=0:forc=0to15:gosub138:iffnfr(0)thenif(vandb%(r))=0thenv=vorb%(r):gosub1688
- 1606 next:ifn=12then1680
- 1608 ifm%(16,pb)<>1then1618
- 1612 v=0:forc=0to15:gosub138:ifr=5thenif(vandb%(s))=0thenv=vorb%(s):gosub1688
- 1616 next:ifn=12then1680
- 1618 ifm%(12,pb)<>1orsb=1orsb=2then1628
- 1624 forc=0to15:gosub138:ifr=a2%(sb)ands=3-sbthengosub1688:c=15
- 1626 next:ifn=12then1680
- 1628 ifm%(4+sb,pb)=0andm%(8+sb,pb)=0then1638
- 1634 forc=0to15:gosub138:on2+(s=sband(r=2orr=3))gosub1688:next:ifn=12then1680
- 1638 m=3:fork=0tom:w=5-k+(k>1)+(k>2)
- 1642 forc=0to15:gosub138:on2+(s=sbandr=w)gosub1688:next:next:ifn=12then1680
- 1648 forc=0to15:gosub138:on2+(s<>sbandr=5)gosub1688:next:ifn=12then1680
- 1652 forc=0to15:gosub138:on2+(s=sb)gosub1688:next:ifn=12then1680
- 1658 forc=0to15:gosub138:on2+(r=4andch%(5,s,pb,pb)=2)gosub1688:next:ifn=12then1680
- 1664 m=3:v=sb:fork=1tom:v=a1%(v):ifch%(5,v,pb,pb)<>2orch%(4,v,pb,pb)=0then1668
- 1666 forc=0to15:gosub138:on2+(s=vandnotfnpl(0))gosub1688:next
- 1668 next:ifn=12then1680
- 1672 m=2:fork=0tom:forc=0to15:gosub138:on2+(r=kandnotfnpl(0))gosub1688:next:next:ifn=12then1680
- 1678 forc=0to15:on1+fnpl(0)gosub1688:next:ifn<12thenforc=0to15:gosub1688:next
- 1680 gosub254:iffnec(p)thenforc=0to15:on1+u%(c)gosub220:next:m=100:gosub36
- 1684 return
- 1688 ifu%(c)=0thenn=n+1:u%(c)=-1:ifn=12thenc=15:k=m
- 1694 return
- 1698 fori=0to3:c=v%(i):gosub138:ch%(r,s,pb,p)=ch%(r,s,pb,p)+1
- 1704 ch%(r,s,p,p)=ch%(r,s,p,p)-1:ch%(r,s,pb,pb)=ch%(r,s,pb,pb)+1:next:return
- 1710 forc=0to15:ifu%(c)then1722
- 1716 gosub138:ch%(r,s,px,pb)=ch%(r,s,px,pb)+1
- 1718 ch%(r,s,pb,pb)=ch%(r,s,pb,pb)-1:ch%(r,s,px,px)=ch%(r,s,px,px)+1
- 1720 ifch%(r,s,pb,px)>0thench%(r,s,pb,px)=ch%(r,s,pb,px)-1
- 1722 next:return
- 1728 z=2:gosub358:n=-1:fori=0to3:v%(i)=-1:next
- 1734 gosub12:on2+(q<>3)goto1746:on2+(bq<0)goto1736:on2+(n<>3)goto1734,1744
- 1736 fori=0to3:j=i:a=(c=v%(i)):i=i+(i-3)*a:next:ifa=0thenon2+(n=3)goto1734,1742
- 1738 cc=c%(3+(s%(c,p)and253)):gosub220:cc=c%(0):ifj=nthenn=n-1:v%(j)=-1:goto1734
- 1740 n=n-1:fori=jton:v%(i)=v%(i+1):next:goto1734
- 1742 gosub220:n=n+1:v%(n)=c:goto1734
- 1744 ifp=pbthenforc=0to15:u%(c)=-1:next:fori=0to3:u%(v%(i))=0:next
- 1746 gosub378:return
- 1802 p=a2%(pb):gosub1858:p=pb:t=tb:v=250+p%(sb,p,0)+p%(sb,a2%(p),0)
- 1810 ifv<bpthenifbp>500thenf=2:goto1817
- 1812 ifbp>500thenf=0:goto1817
- 1814 f=1+(v>=bp):iffnhp(p)thengosub1960:onqgoto1836,1836,1817
- 1816 gosub1930:gosub12:onqgoto1836,1836
- 1817 t=tb:onfgoto1818,1819:gosub1858:goto1820
- 1818 p%(sb,p,0)=0:p%(sb,a2%(p),0)=0:bp=500
- 1819 a$=a$(9+f):gosub234
- 1820 p=a1%(p):gosub1858:p=a2%(p):gosub1858:iff=2thenm=240:gosub36:gosub420:goto1836
- 1825 poke646,c%(3+t):a$=a$(20):iff=0thenl=4:n=bp:gosub494
- 1826 x=xs%(3)-4:y=ys%(2):gosub262
- 1827 l=4:n=p%(sb,t,0)+p%(sb,a2%(t),0):gosub494:x=xs%(1)+6:y=ys%(0)+1+t:gosub262
- 1828 a$=a$(21):np%(2)=250
- 1829 iff=0thenl=3:n=bp-n:n=n+(n-10)*(n<=0):np%(2)=n:gosub494
- 1830 x=xs%(1)+6:y=ys%(2):gosub262
- 1831 t=1-t:poke646,c%(3+t):l=4:n=p%(sb,t,0)+p%(sb,a2%(t),0):gosub494
- 1832 x=xs%(1)+6:y=ys%(0)+1+t:gosub262:poke646,c%(2)
- 1833 fors=0to3:forp=0to3:v=0:fori=0to3:v=v+sn%(s,i,p):next:ifv=12then1835
- 1834 px=p:fori=1to3:px=a1%(px):w=sn%(s,px,p):sn%(s,px,p)=w+(w-(-1))*(w=0):next
- 1835 next:next:m=240:gosub36:gosub284:forp=0to3:gosub102:next
- 1836 return
- 1858 c=-1:u=ca-1:fors=3to0step-1:forr=5to0step-1:u%(s*6+r)=0:ifch%(r,s,p,p)=0then1914
- 1866 forn=1toch%(r,s,p,p):c=c+1:onrgoto1874,1878,1884,1894,1890
- 1872 on2+(s=sb)goto1900,1906
- 1874 on2+((s=0andm%(12,p)=>n)or(m%(13,p)=>n))goto1900,1894
- 1878 ifs=sbandn=2andm%(4+s,p)>0then1900
- 1882 on2+(m%(8+s,p)=>nor(s=3andm%(12,p)=>n)orm%(14,p)=>n)goto1900,1894
- 1884 ifs=sbandn=2andm%(4+s,p)>0then1900
- 1888 on2+(m%(8+s,p)=>norm%(15,p)=>n)goto1900,1894
- 1890 ifm%(16,p)=>nthen1900
- 1894 ifs<>sbthen1906
- 1898 on2+(m%(17+s,p)>=n)goto1900,1906
- 1900 u%(s*6+r)=u%(s*6+r)+1:iffnec(p)then1910
- 1903 gosub138:u=u+1:x=x%(u,p):y=y%(u,p):gosub154:goto1910
- 1906 iffnec(p)thengosub220
- 1910 next
- 1914 next:next:a$=str$(p%(sb,p,0)):gosub234:j=p:fork=1to3:j=a1%(j):fors=0to3:forr=0to5
- 1924 v=u%(s*6+r):ifch%(r,s,p,j)>vthenv=ch%(r,s,p,j)
- 1926 ch%(r,s,p,j)=ch%(r,s,p,j)+v:sn%(s,p,j)=sn%(s,p,j)+v:next:next:next:return
- 1930 :
- 1934 fors=0to3:v%(s)=0:on2+(sn%(s,p,p)=0)goto1938:n=so%(s,p)-sn%(s,a2%(p),p):u=0
- 1935 fori=0to5:r=5-i:m=ch%(r,s,p,p):n=n-2:u=u+m:a=(m<2andn>0):i=i+(i-5)*a:next
- 1936 u%(s)=u
- 1937 v%(s)=u:on2+(r=0)goto1938:m=sn%(s,p,p)-(n+1)/2:on2+(m<1)goto1938:v%(s)=u+m
- 1938 next:u=v%(0)+v%(1)+v%(2)+v%(3)
- 1940 f=1+(1-2*f)*(u%(sb)*2<so%(sb,p)-sn%(sb,a2%(p),p)oru<12-f):return
- 1960 z=3+f:gosub358:gosub12:gosub378:ifq=3thenf=f+bq
- 1974 return
- 2002 sysml+129,fna(2),fna(2)+96,fna(4):z=5:gosub366:pw=pb:fornt=12to1step-1
- 2018 pl=pw:p=pl:nc=0:tp=0:iffnhp(p)thengosub2116:onqgoto2112,2112,2024
- 2022 gosub2172:onbgosub2754,2712,2720,2746:gosub12:onqgoto2112,2112
- 2024 sl=s%(c,p):gosub2134
- 2026 p=a1%(p):ifp=plthen2048
- 2030 nc=nc+1:iffnhp(p)thengosub2116:onqgoto2112,2112,2038
- 2034 onncgosub2286,2354,2422
- 2036 onbgosub2754,2712,2720,2746,2652,2762,2602:gosub12:onqgoto2112,2112
- 2038 gosub2134:ifs%(c,p)<>slthenifs%(c,p)=sbtheniftp=0thentp=-1:pw=p:goto2026
- 2042 ifs%(c,p)<>s%(t%(pw),pw)then2026
- 2044 ifr%(c,p)<=r%(t%(pw),pw)then2026
- 2046 pw=p:goto2026
- 2048 t=pwand253:y=yt%(pw)*8+52:x=xt%(pw)*8+24:v=0:ifx>255thenx=x-256:v=4+8
- 2052 pokevl+5,y:pokevl+4,x:pokevl+7,y:pokevl+6,x:pokevl+16,v:pokevl+21,1+2+4+8
- 2054 fori=0to3:np%(t)=np%(t)-10*(r%(t%(i),i)>2):next:np%(t)=np%(t)-10*(nt=1)
- 2058 fori=0to3:c=t%(i):cp%(r%(c,i),s%(c,i),0)=cp%(r%(c,i),s%(c,i),1):next
- 2061 v=0:fori=0to3:v=v-b%(i)*(s%(t%(i),i)=sl):next
- 2062 onvgoto2063,2064,2070,2065,2071,2073,2080,2066,2072,2074,2080,2075:goto2080
- 2063 i=0:goto2067
- 2064 i=1:goto2067
- 2065 i=2:goto2067
- 2066 i=3
- 2067 j=i:fork=1to3:j=a1%(j):forr=0to5:ch%(r,sl,i,j)=ch%(r,sl,i,i):next:next
- 2068 j=i:fork=1to3:j=a1%(j):sn%(sl,i,j)=so%(sl,j):next:goto2080
- 2070 i=0:j=1:goto2076
- 2071 i=0:j=2:goto2076
- 2072 i=0:j=3:goto2076
- 2073 i=1:j=2:goto2076
- 2074 i=1:j=3:goto2076
- 2075 i=2:j=3
- 2076 forr=0to5:ch%(r,sl,i,j)=ch%(r,sl,i,i):ch%(r,sl,j,i)=ch%(r,sl,j,j):next
- 2077 sn%(sl,i,j)=so%(sl,j):sn%(sl,j,i)=so%(sl,i)
- 2080 fori=0to3:r%(t%(i),i)=-1:s%(t%(i),i)=-1:t%(i)=-1:next
- 2088 m=60:gosub36:pokevl+21,1+2:gosub284:next:gosub420
- 2112 return
- 2116 a$=a$(22):gosub234:ifp<>plthenrx=r%(t%(pw),pw)
- 2120 gosub12:on2+(p=plorq<>3)goto2126
- 2121 ifsn%(sl,p,p)>0thenon2+(s%(c,p)<>sl)goto2120:on2+tpgoto2126:sp=sl:goto2124
- 2122 on2+(sn%(sb,p,p)=0)goto2126:on2+(s%(c,p)<>sb)goto2120:sp=sb:iftp=0thenrx=-1
- 2124 on2+(r%(c,p)>rx)goto2126
- 2125 fori=0to5:r=5-i:i=i+(i-5)*(ch%(r,sp,p,p)>0):next:ifr>rxthen2120
- 2126 gosub254:return
- 2134 t%(p)=c:gosub292:gosub138:x=xt%(p):y=yt%(p):gosub170:px=p:fork=1to3:px=a1%(px)
- 2143 ifs<>slthensn%(sl,p,px)=0
- 2144 so%(s,px)=so%(s,px)-1:ifch%(r,s,p,px)>0thench%(r,s,p,px)=ch%(r,s,p,px)-1
- 2146 ifsn%(s,p,px)<1then2150
- 2147 sn%(s,p,px)=sn%(s,p,px)-1:ifsn%(s,p,px)>0then2150
- 2148 w=so%(s,px):j=px:fori=1to3:j=a1%(j):m=sn%(s,j,px):w=w+m*(m>0):next
- 2149 sn%(s,p,px)=(w>0)
- 2150 next:px=p:w=so%(s,p):fork=1to3:px=a1%(px)
- 2152 ifsn%(s,px,p)=wthenj=p:fori=1to3:j=a1%(j):sn%(s,j,p)=0:next:sn%(s,px,p)=w
- 2154 next:ch%(r,s,p,p)=ch%(r,s,p,p)-1:sn%(s,p,p)=sn%(s,p,p)-1
- 2166 cp%(r,s,1)=cp%(r,s,1)+1:m=40:gosub36:return
- 2172 b=2:ifnt=1thenb=1:goto2282
- 2177 sp=sb:t=pand253:ifsn%(sb,p,p)=0then2206
- 2179 gosub2728:ifsn%(sb,p,p)<>ntthenon2+agoto2189,2206
- 2181 b=3+(aand(so%(sb,p)=1orch%(r,sb,p,p)=2or(nt=2andcp%(r,sb,1)=0))):goto2282
- 2189 ift<>tbthenifsn%(sb,p,p)<=so%(sb,p)then2206
- 2192 ifsn%(sb,p,p)*2>(nt)then2282
- 2194 ift=tbthenw=np%(td)+np%(2):ifw>=250andw<=250then2282
- 2195 gosub2770:ifathen2206
- 2196 ifsn%(sb,p,p)=1thengosub2712:ifcp%(r%(c,p),sb,1)=0then2282
- 2198 v=0:px=p:forx=1to3:px=a1%(px):gosub2806:v=v-a:next:ifv=0thenv=1
- 2202 ifsn%(sb,p,p)*v>=so%(sb,p)then2282
- 2204 ifp=a2%(pb)then2282
- 2206 sp=a1%(sp):ifsp=sbthen2216
- 2210 ifsn%(sp,p,p)>1then2206
- 2212 gosub2728:ifathengosub2712:ifcp%(r%(c,p),sp,1)=0then2282
- 2214 goto2206
- 2216 gosub2770:ifa=0then2228
- 2220 sp=a1%(sp):ifsp=sbthen2228
- 2222 ifsn%(sp,p,p)=0then2220
- 2224 gosub2728:ifathen2282
- 2226 goto2220
- 2228 ifsn%(sb,p,p)=0then2250
- 2232 ift<>tbthenifsn%(sb,p,p)<ntthen2250
- 2233 gosub2770:ifathenifsn%(sb,p,p)*2<=ntthen2250
- 2234 v=0:px=p:forx=1to3:px=a1%(px):gosub2806:v=v-a:next:ifv=0thenv=1
- 2238 ifsn%(sb,p,p)*v<=so%(sb,p)then2250
- 2239 gosub2728:ifathen2282
- 2240 ifso%(sb,p)-v=0thenb=3:goto2282
- 2241 forj=0to2:v=2-j:a=(ch%(v,sb,p,p)+cp%(v,sb,1)<2):j=j+(j-2)*a:next
- 2242 ifa=0orv=0then2245
- 2243 ifv=1thenifch%(1,sb,p,p)>0thenb=4:rx=0:goto2282
- 2244 ifch%(2,sb,p,p)>0thenb=4:rx=1:goto2282
- 2245 b=3:goto2282
- 2250 ifsn%(sp,p,p)=0then2256
- 2254 gosub2834:ifch%(r,sp,a1%(p),p)=0andch%(r,sp,a2%(p),p)>0then2282
- 2256 sp=a1%(sp):ifsp<>sbthen2250
- 2258 ifp=a2%(pb)andsn%(sb,p,p)>0then2282
- 2261 sl=-1
- 2262 sp=a1%(sp):ifsp=sbthenon2+slgoto2270:sp=sl:b=3:goto2282
- 2264 ifsn%(sp,p,p)=0then2262
- 2266 ifso%(sp,p)=0thenb=3:goto2282
- 2267 n=0:px=a1%(p):ifsn%(sp,px,p)=0thenn=1:sl=sp
- 2268 px=a2%(px):ifsn%(sp,px,p)=0thenn=n+1:sl=sp:ifn=2thenb=3:goto2282
- 2269 goto2262
- 2270 n=1:sl=-1
- 2274 sp=a1%(sp):ifsp=sbthensp=sl:gosub2728:b=3+a:goto2282
- 2276 ifsn%(sp,p,p)<nthen2274
- 2278 gosub2720:ifsl>-1thenifn=sn%(sp,p,p)thenifr%(c,p)>=rthen2274
- 2280 n=sn%(sp,p,p):r=r%(c,p):sl=sp:goto2274
- 2282 return
- 2286 b=4:ifnt=1thenb=1:goto2350
- 2292 u=0:px=a1%(p):gosub2778:v=r:ifa=0thenv=-1:gosub2806:ifathenu=1:v=r
- 2294 px=a2%(p):gosub2778:w=r:ifa=0thenw=-1:gosub2806:ifathenu=u+2:w=r
- 2297 ifsn%(sl,p,p)=0then2318
- 2298 sp=sl:ifsn%(sl,p,p)=1thenb=6:goto2350
- 2301 rx=r%(t%(pw),pw):gosub2712:gosub2834:ifrx>=r%(c,p)thenrx=-1:goto2308
- 2304 if(u=0andv>r%(c,p)andv>=w)oru=1or(u=3andv>=w)then2350
- 2305 ifsl<>sbthenifr%(c,p)=rthenb=2:goto2350
- 2306 ifsl=sbthenifsn%(sl,p,p)>=3then2350
- 2307 gosub2854:goto2350
- 2308 if(u=0and(r%(t%(pw),pw)>=worv>=w))oru=1or(u=3andv>=w)then2350
- 2313 gosub2854:goto2350
- 2318 ifsn%(sb,p,p)=0then2340
- 2322 sp=sb:ifsn%(sb,p,p)=1thenb=6:goto2350
- 2330 rx=-1:gosub2712:gosub2834
- 2332 if(u=1andv>r%(c,p))or(u=3andv>r%(c,p)andv>=w)then2350
- 2338 gosub2854:goto2350
- 2340 a=(pl=pbandsl=sb)
- 2342 ifathensp=sb:gosub2834:ifr%(t%(pb),pb)<>rthenb=7+(p<>a2%(pb))*2:goto2350
- 2348 b=7:if(u=0and(r%(t%(pw),pw)<wandv<w))oru=2or(u=3andv<w)thenb=5
- 2350 return
- 2354 b=4:ifnt=1thenb=1:goto2418
- 2360 u=0:px=a1%(p):gosub2778:v=r:ifa=0thenv=-1:gosub2806:ifathenu=1:v=r
- 2364 ifsn%(sl,p,p)=0then2388
- 2366 sp=sl:ifsn%(sl,p,p)=1thenb=6:goto2418
- 2370 iftpthenb=3:goto2418
- 2372 rx=r%(t%(pw),pw):gosub2712:gosub2834:ifrx>=r%(c,p)thenrx=-1:goto2382
- 2378 if(u=0andv>r%(c,p))oru=1then2418
- 2379 ifsl<>sbthenifr%(c,p)=rthenb=2:goto2418
- 2380 ifsl=sbthenifsn%(sl,p,p)>=3then2418
- 2381 gosub2854:goto2418
- 2382 ifp<>a2%(pw)or(u=0andv>r%(t%(pw),pw))oru=1then2418
- 2385 gosub2854:goto2418
- 2388 ifsn%(sb,p,p)=0then2408
- 2390 sp=sb:ifsn%(sb,p,p)=1thenb=6:goto2418
- 2394 rx=r%(t%(pw),pw):gosub2712:gosub2834:iftp=0thenrx=-1:goto2400
- 2398 ifrx>=r%(c,p)thenrx=-1:goto2418
- 2400 ifu=1andv>r%(c,p)then2418
- 2406 gosub2854:goto2418
- 2408 b=7:ifp<>a2%(pw)then2418
- 2411 a=(pl=pbandsl=sb)
- 2412 ifathensp=sb:gosub2834:ifr%(t%(pb),pb)<>rthenb=7+(p<>a2%(pb))*2:goto2418
- 2416 ifu=0andr%(t%(pw),pw)>=vthenb=5
- 2418 return
- 2422 b=4:ifnt=1thenb=1:goto2472
- 2432 ifsn%(sl,p,p)=0then2450
- 2434 sp=sl:ifsn%(sp,p,p)=1thenb=6:goto2472
- 2437 rx=r%(t%(pw),pw):gosub2712:gosub2834:iftpthenrx=-1:goto2441
- 2440 ifrx>=r%(c,p)thenrx=-1
- 2441 ifp<>a2%(pw)then2472
- 2444 gosub2854:goto2472
- 2450 ifsn%(sb,p,p)=0then2468
- 2454 sp=sb:ifsn%(sb,p,p)=1thenb=6:goto2472
- 2458 rx=r%(t%(pw),pw):gosub2712:gosub2834:iftp=0thenrx=-1:goto2466
- 2460 ifrx>=r%(c,p)thenrx=-1
- 2461 ifp<>a2%(pw)then2472
- 2466 gosub2854:goto2472
- 2468 b=7+(p=a2%(pw))*2
- 2472 return
- 2602 z=-1:v=3
- 2608 u=-1:forsp=0to3:ifsn%(sp,p,p)=0then2614
- 2612 ifso%(sp,p)=0thengosub2720:ifr%(c,p)<vthenw=fnsl(sp):ifw>uthenz=c:u=w
- 2614 next:ifz>-1then2648
- 2618 u=-1:forsp=0to3:ifsn%(sp,p,p)=0then2622
- 2620 ifsn%(sp,pb,p)=0thengosub2720:ifr%(c,p)<vthenw=fnsl(sp):ifw>uthenz=c:u=w
- 2622 next:ifz>-1then2648
- 2626 u=-1:forsp=0to3:ifsn%(sp,p,p)=0then2634
- 2627 if(pand253)<>tbthenifsn%(sp,p,p)=sn%(sp,pb,p)+1then2634
- 2628 gosub2728:ifatheniffnl2(sp)then2634
- 2630 w=fnsl(sp):ifr>2thenifw=1then2634
- 2632 gosub2720:ifr%(c,p)<vthenifr%(c,p)<>rorch%(r,sp,p,p)=2thenifw>uthenz=c:u=w
- 2634 next:ifz>-1then2648
- 2638 ifv=3thenv=6:goto2608
- 2640 forsp=0to3:ifsn%(sp,p,p)<>1then2642
- 2641 gosub2712:gosub2728:ifa=0orcp%(r%(c,p),sp,1)=0thens=sp:sp=3
- 2642 next:ifz>-1then2648
- 2644 forsp=0to3:ifsn%(sp,p,p)>0thengosub2720:ifr%(c,p)<vthenv=r%(c,p):z=c:ifv=0thensp=3
- 2647 next
- 2648 c=z:return
- 2652 s=-1:v=2
- 2658 forsp=0to3:ifsn%(sp,p,p)<>1then2664
- 2662 gosub2712:ifr%(c,p)>vthengosub2728:ifa=0orcp%(r%(c,p),sp,1)=0thens=sp:sp=3
- 2664 next:ifs>-1then2708
- 2668 u=13:forsp=0to3:ifsn%(sp,p,p)=0then2672
- 2670 ifso%(sp,p)=0thengosub2712:ifr%(c,p)>vthenw=fnsl(sp):ifw<uthens=sp:u=w
- 2672 next:ifs>-1thensp=s:goto2704
- 2676 u=13:forsp=0to3:ifsn%(sp,p,p)=0then2680
- 2678 ifsn%(sp,pb,p)=0thengosub2712:ifr%(c,p)>vthenw=fnsl(sp):ifw<uthens=sp:u=w
- 2680 next:ifs>-1thensp=s:goto2704
- 2684 u=13:forsp=0to3:ifsn%(sp,p,p)=0then2692
- 2685 if(pand253)<>tbthenifsn%(sp,p,p)=sn%(sp,pb,p)+1then2692
- 2686 gosub2728:ifatheniffnl2(sp)then2692
- 2688 gosub2712:on2+(r%(c,p)>2)gosub2842:ifr%(c,p)<=vthen2692
- 2690 ifr%(c,p)<>rorch%(r,sp,p,p)=2thenw=fnsl(sp):ifw<uthens=sp:u=w
- 2692 next:ifs>-1thensp=s:goto2704
- 2696 ifv=2thenv=-1:goto2658
- 2700 v=6:forsp=0to3:ifsn%(sp,p,p)>0thengosub2720:ifr%(c,p)<vthenv=r%(c,p):w=c
- 2702 next:c=w:goto2708
- 2704 on2+(v=2)gosub2842,2720
- 2708 return
- 2712 fori=0to11:c=i:i=i+(i-11)*(s%(c,p)=spandr%(c,p)>-1):next:return
- 2720 fori=0to11:c=11-i:i=i+(i-11)*(s%(c,p)=spandr%(c,p)>-1):next:return
- 2728 gosub2834:a=(ch%(r,sp,p,p)<>0):ifathenifsp<>sbandp<>pbthengosub2738:a=nota
- 2734 return
- 2738 a=(sn%(sb,pb,p)=nt+(pb=plor(nc=2anda2%(p)=pb)ornc=3)):return
- 2746 fori=0to11:c=11-i:i=i+(i-11)*(s%(c,p)=spandr%(c,p)>rx):next:return
- 2754 fori=0to11:a=(r%(i,p)>-1):c=i:i=i+(i-11)*a:next:return
- 2762 fori=0to11:a=(s%(i,p)=sp):c=i:i=i+(i-11)*a:next:return
- 2770 a=((so%(sp,p)=0)or(sn%(sp,a1%(p),p)=0andsn%(sp,a2%(a1%(p)),p)=0)):return
- 2778 ifso%(sl,p)=0orsn%(sl,px,p)=0thena=0:goto2802
- 2784 ifsn%(sl,px,p)=-1then2788
- 2786 a=-1:fori=0to5:r=5-i:i=i+(i-5)*(ch%(r,sl,px,p)>0):next:goto2802
- 2788 ifp=a2%(pb)thenifsl=sbthena=0:goto2802
- 2790 n=4*nt-nc:a=(so%(sl,p)=n):ifathen2796
- 2792 j=p:k=so%(sl,p):forl=1to3:j=a1%(j):m=sn%(sl,j,p):k=k+m*(m>0):next
- 2794 a=(nt*k/n>0.5+0.125*(2-d%(0,0))):ifa=0then2802
- 2796 fori=0to5:r=i:k=cp%(r,sl,1):ifk=2then2800
- 2798 forj=0to3:k=k+ch%(r,sl,j,p):j=j+(j-3)*(k=2):next:i=i+(i-5)*(k<2)
- 2800 next:ifk=2thenr=l
- 2802 return
- 2806 ifso%(sb,p)=0orsn%(sb,px,p)=0thena=0:goto2830
- 2812 ifsn%(sb,px,p)=-1then2816
- 2814 a=-1:fori=0to5:r=5-i:i=i+(i-5)*(ch%(r,sb,px,p)>0):next:goto2830
- 2816 ifp=a2%(pb)thena=0:goto2830
- 2818 n=4*nt-nc:a=(so%(sb,p)=n):ifathen2824
- 2820 j=p:k=so%(sb,p):forl=1to3:j=a1%(j):m=sn%(sb,j,p):k=k+m*(m>0):next
- 2822 a=(nt*k/n>0.5+0.125*(2-d%(0,0))):ifa=0then2830
- 2824 fori=0to5:r=i:k=cp%(r,sb,1):ifk=2then2828
- 2826 forj=0to3:k=k+ch%(r,sb,j,p):j=j+(j-3)*(k=2):next:i=i+(i-5)*(k<2)
- 2828 next:ifk=2thenr=l
- 2830 return
- 2834 fori=0to5:r=5-i:i=i+(i-5)*(cp%(r,sp,0)<>2):next:return
- 2842 j=2:ifch%(4,sp,p,p)>0thengosub2834:ifr<>4thenj=3
- 2848 fori=0to11:c=11-i:i=i+(i-11)*(s%(c,p)=spandr%(c,p)>j):next:return
- 2854 ifrx>1orr%(c,p)<3then2874
- 2860 ifch%(r,sp,p,p)=0thenrx=2:goto2874
- 2862 gosub2746:ifr%(c,p)>2then2874
- 2864 iffnl2(sp)thenrx=2:goto2874
- 2866 ifrx=-1thenrx=2:gosub2746:on2+(r%(c,p)<>r)goto2874:rx=-1
- 2868 ifsp=sborp=pbthen2874
- 2870 gosub2738:ifathenrx=2:goto2874
- 2872 px=pb:gosub2778:ifa=0thengosub2806:ifathenrx=2
- 2874 return
- 2902 q=2:gosub402:ns%(0)=0:ns%(1)=0:gosub474
- 2910 poke176,lr:poke177,hr:poke178,4:sysrl:pd=peek(rv)-1:return
- 2916 gosub342:sysml+126,0,39,0,24,222,223,c%(1),12:poke53281,c%(4)
- 2922 sysml+48,3,36,3,14,fna(0):pokemv,ls:pokemv+2,12:pokerv+57,d%(1,0):pokerv+58,d%(2,0)
- 2926 sysml+9:ifcr%=0thensysml+60,a$(29):cr%=i%:ifcr%=0then2926
- 2928 oncr%goto2933
- 2930 forj=0to3:i=3-j:j=j+(j-3)*(cr%>=d%(i,1)):next:ifcr%=d%(i,0)+d%(i,1)then2926
- 2932 i%=d%(i,0)+d%(i,1):gosub386:i%=cr%:gosub394:d%(i,0)=cr%-d%(i,1):goto2926
- 2933 sysml+45,3,36,3,14,fna(0):gosub350:ifd%(1,0)<>peek(rv+57)thenifd%(1,0)=0thenq=4:bn=-1
- 2935 ifd%(2,0)=peek(rv+58)then2960
- 2938 forj=1to3:l=(j=pbandcn=16)
- 2940 iflthensysml+30,x%(0,j),x%(15,j)+1,y%(0,j),y%(15,j)+1,160,c%(2)
- 2942 k=-1:fori=2+(2-ca)*lto13+(13-cz)*l:k=k+1:ifk=t%(j)ors%(k,j)=-1then2958
- 2944 ifd%(2,0)=0thenon(jand253)+1goto2954,2956
- 2946 poke646,c%(3+(s%(k,j)and253))
- 2948 if(jand253)=1thensysml+12,x%(i,j),y%(i,j),r$(r%(k,j))+s$(s%(k,j)):goto2958
- 2950 sysml+12,x%(i,j),y%(i,j),r$(r%(k,j))
- 2952 sysml+12,x%(i,j),y%(i,j)+1,s$(s%(k,j)):goto2958
- 2954 sysml+126,x%(i,j),x%(i,j),y%(i,j),y%(i,j)+1,97,98,c%(2),c%(2):goto2958
- 2956 sysml+12,x%(i,j),y%(i,j),a$(23)
- 2958 next:next:poke646,c%(2)
- 2960 return
- 2964 gosub342:sysml+42,hh:pokemv,lh:pokemv+2,6
- 2970 sysml+210,1+128,38,3,20,c%(0),c%(0),c%(4),c%(3),0,"","":gosub350:return
- 2978 gosub342:sysml+126,0,39,0,24,222,223,c%(1),12:poke53281,c%(4)
- 2984 sysml+48,10,29,6,12,fna(1):pokemv,lq:pokemv+2,2
- 2986 sysml+9:i%=cr%:ifi%=0thensysml+60,a$(30):ifi%=0then2986
- 2988 ifi%=1thenq=1
- 2990 gosub350:return
- 3002 ifdv=0thendv=peek(186):dv=dv+(dv-8)*(dv<8ordv>29):load"rh-pinochle 1",dv
- 3012 deffna(x)=32768+a%(x):deffnec(x)=(x=0ord%(2,0)=1)
- 3016 deffnfr(x)=(s%(c,p)=sbandr%(c,p)>0):deffnhp(x)=(x=0andd%(1,0)=1)
- 3020 deffnl2(x)=(sn%(x,p,p)=2andch%(r,x,p,p)=1andcp%(r,x,1)=0)
- 3022 deffnmm(x)=x+(x-10)*(x=2)
- 3024 deffnpl(x)=((s%(c,p)=0andr%(c,p)=1)or(s%(c,p)=3andr%(c,p)=2))
- 3026 deffnsl(x)=ch%(0,x,p,p)+ch%(1,x,p,p)+ch%(2,x,p,p):poke53265,27
- 3032 poke198,0:wait198,15:poke198,0:sysmm:sysml:sysml+18,1,38,0,20
- 3040 sysml+6,u%(2)*256:pokemm+9,0:sysml+42,hg:return
- 4002 pokevl+21,0:sysml+3:sysmm+3:poke648,4:poke53272,23:poke56576,199:print"[147]"
- 4010 fori=0to21:poke828+i,8+i:next:ifdv<8ordv>29ordv=8then4016
- 4014 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
- 4016 a$="hello connect":forj=8to29:i=peek(828+j-8):ifi=14thennext
- 4018 close2:open2,i,2:close2:ifstthen4022
- 4020 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then4024
- 4022 next:print"[147]":poke53272,23:poke186,8:end
- 4024 q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
- 4026 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
- 4028 print"run:":poke631,13:poke632,13:poke198,2:end
- 10000 a$="rh-pinochle 2c"
- 10010 dv=peek(186):open15,dv,15,"s0:"+a$:close15:savea$,dv:end
-